package com.chenyongjing.design.pattern.builder.withoutdirector;

public class Worker extends Builder {

    private Product product;

    public Worker(){
        product = new Product();
    }

    @Override
    Builder buildFirst(String msg) {
        product.setFirstProperty(msg);
        return this;
    }

    @Override
    Builder buildSecond(String msg) {
        product.setSencodProperty(msg);
        return this;
    }

    @Override
    Builder buildThree(String msg) {
        product.setThreeProperty(msg);
        return this;
    }

    @Override
    Builder buildFour(String msg) {
        product.setFourProperty(msg);
        return this;
    }

    @Override
    Product getProduct() {
        return product;
    }
}
